package com.demo.Controller;

import com.demo.bean.Person;
import com.demo.components.Car;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class Hellow {
    @Autowired
    public Car car;

    @Autowired
    public Person person;

    @RequestMapping("/hellow")
    public String handel01(){
        return "hellow world";
    }

    @RequestMapping("/getCar")
    public Car getCar() {
        log.info("得到car");
        return car;
    }
    @RequestMapping("/getPerson")
    public Person getPerson() {
        log.info("得到Person");
        return person;
    }

}
